<?php
namespace Game\Lib;

class Game
{	
	
	/*****************************
				参数
	*****************************/


	//游戏类型
	const Game_Type             = 26;	//炸金花

	/** @var string 房间用户uid */
	const RoomUser_UID          = "[roomid]:[accountid]";
	
	/*	开局默认分数	*/
	const Default_Score         = 4;
	
	
	/*	游戏人数范围	*/
	const Default_PlayerCount		= 6;
	
	
	/*	用户状态	*/
	const AccountStatus_Initial		= 0;	//首次进房初始状态
	const AccountStatus_Notready	= 1;	//未准备
	const AccountStatus_Ready		= 2;	//已准备
	//const AccountStatus_Waiting		= 3;	//已开局未选择
	const AccountStatus_Visible		= 4;	//看牌
	const AccountStatus_Invisible	= 5;	//闷牌
	const AccountStatus_Giveup		= 6;	//弃牌
	const AccountStatus_Lost		= 7;	//比牌输
    const AccountStatus_Win		    = 8;	//比牌赢
//    const AccountStatus_Guest       = 9;    //旁观

	/*	游戏中状态	*/
	const PlayingStatus_Waiting		= 1;	//等待别人中
	const PlayingStatus_Betting		= 2;	//下注中
	
	/*	房间状态	*/
	const RoomStatus_Waiting		= 1;	//等待中
	const RoomStatus_Playing		= 2;	//游戏中
	const RoomStatus_Closed			= 3;	//已关闭
	
	/*	操作超时时间	*/
	const LimitTime_StartGame		= 60;	//第一局开局时限
	const LimitTime_Ready			= 10;	//准备时限
	const LimitTime_Betting			= 15;	//下注时限
	const LimitTime_ClearRoom		= 300;	//时限

	/*	牌型概率	千分之几  */
	const Probability_Santiao		= 8;
	const Probability_Tonghuashun	= 7;
	const Probability_Tonghua   	= 60;
	const Probability_Shunzi   	 	= 60;
	const Probability_Duizi  	 	= 270;
	const Probability_Gaopai  	 	= 595;

	/** @var array 人数、局数=>房卡 */
	const Ticket_Count = [
	    6=>[12=>3,24=>6],
        9=>[12=>4,24=>8],
        12=>[12=>6,24=>12],
    ];
}

